﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<%@ Import Namespace="CourseSystem.Common.Helpers" %>
<%@ Import Namespace="CourseSystem.Core.BLL" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    学生学时监控
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <% Html.RenderPartial("AdminTopUc", "学生学时监控"); %>
    <table width="100%" border="0" cellpadding="0" cellspacing="1" class="table03">
        <% using (Ajax.BeginForm("StudentHoursListUc", new AjaxOptions { HttpMethod = "Get", UpdateTargetId = "listDiv", }))
           {%>
        <tr class="box06">
            <td width="10%" height="27" align="center">
                <div align="right">
                    院校 :
                </div>
            </td>
            <td width="13%" align="center" class="bg3">
                <div align="left">
                    <select name="CollegeIdSearch" id="CollegeIdSearch">
                        <option value="0">请选择</option>
                    </select>
                </div>
            </td>
            <td width="11%" align="center">
                <div align="right">
                    系别 :</div>
            </td>
            <td width="16%" align="center" class="bg3">
                <div align="left">
                    <select name="DepartIdSearch" id="DepartIdSearch">
                        <option value="0">请选择</option>
                    </select>
                </div>
                <div align="left">
                </div>
            </td>
            <td width="11%" align="center">
                <div align="right">
                    专业 :</div>
            </td>
            <td width="16%" align="center" class="bg3">
                <div align="left">
                    <select name="SubjectIdSearch" id="SubjectIdSearch">
                        <option value="0">请选择</option>
                    </select>
                </div>
                <div align="left">
                </div>
            </td>
            <td align="center" class="box06">
                <div align="right">
                    班别 :</div>
            </td>
            <td align="center" class="bg3">
                <div align="left">
                    <select name="ClassIdSearch" id="ClassIdSearch">
                        <option value="0">请选择</option>
                    </select>
                </div>
            </td>
        </tr>
        <tr class="box06">
            <td height="27" align="center">
                <div align="right">
                    学生学号 :</div>
            </td>
            <td align="left" class="bg3">
                <input name="uidSearch" type="text" size="18" id="uidSearch" />
            </td>
            <td align="center">
                <div align="right">
                    姓名 :</div>
            </td>
            <td colspan="" align="center" class="bg3">
                <div align="left">
                    <input name="nameSearch" type="text" size="18" id="nameSearch" />
                </div>
                <div align="left">
                </div>
            </td>
            <td height="27" align="center">
                <div align="right">
                    年级 :</div>
            </td>
            <td align="left" class="bg3" colspan="">
                <%=Html.DropDownList("YearIdSearch", StudentHelper.GetGradeYear())%>
                <input type="submit" value="查询" />
            </td>
            <td height="27" align="center">
                <div align="right">
                    总学时 :</div>
            </td>
            <td align="left" class="bg3" colspan="">
                <%=CourseSettingBLL.Get().StudentHours%>
                <button id="btnAdd">
                    编辑总学时</button>
            </td>
        </tr>
        <% } %>
    </table>
    <table width="100%" height="5" border="0" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
        <tr>
            <td height="5" bgcolor="#FFFFFF">
            </td>
        </tr>
    </table>
    <div id="listDiv">
        <% Html.RenderAction("StudentHoursListUc"); %>
    </div>
    <div id="editDiv" title="编辑学生总学时数">
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeaderContent" runat="server">
    <script type="text/javascript">

        $(function () {
            selectLoad("CollegeIdSearch", "Ajax/GetCollege");
            selectChangeLoad("DepartIdSearch", "CollegeIdSearch", "Ajax/GetDepart/");
            selectChangeLoad("SubjectIdSearch", "DepartIdSearch", "Ajax/GetSubject/");
            selectChangeLoad("ClassIdSearch", "SubjectIdSearch", "Ajax/GetClass/");

            selectChangeLoadDef("CollegeIdSearch", "SubjectIdSearch", "Ajax/GetSubject/", "ClassIdSearch", "Ajax/GetClass/");
            selectChangeLoadDef("DepartIdSearch", "ClassIdSearch", "Ajax/GetClass/");
            /* $("#fileField").change(function () {
            //alert(11);
            $("#importForm").submit();
            });*/

            $("#editDiv").dialog({
                autoOpen: false,
                height: 220,
                width: 300,
                modal: true,
                close: function () {
                    window.location.reload();
                }
            });

            $("#btnAdd")
			.click(function () {
			    $("#editDiv").html("loading...");
			    $("#editDiv").load(appRoot + 'AdminMonitor/StudentHoursEditUc/' + "?rd=" + rdTime());
			    $("#editDiv").dialog("open");
			});

        });

    </script>
</asp:Content>
